// 路由请求
const Router = require("koa-router");
const router = new Router();

const systemRouter = require("./system");
const systemUserRouter = require('./sys_user')
const systemDictTypeRouter = require('./sys_dict_type')
const systemDictDataRouter = require('./sys_dict_data')
const systemPostRouter = require('./sys_post')
const systemDeptRouter = require('./sys_dept')
const systemMenuRouter = require('./sys_menu')
const systemRoleRouter = require('./sys_role')
const syslogIninforRouter = require('./sys_logininfor')

module.exports = (app) => {
  // 启动路由
  app.use(systemRouter.routes()).use(router.allowedMethods());
  app.use(systemUserRouter.routes()).use(router.allowedMethods());
  app.use(systemDictTypeRouter.routes()).use(router.allowedMethods())
  app.use(systemDictDataRouter.routes()).use(router.allowedMethods())
  app.use(systemPostRouter.routes()).use(router.allowedMethods())
  app.use(systemDeptRouter.routes()).use(router.allowedMethods())
  app.use(systemMenuRouter.routes()).use(router.allowedMethods())
  app.use(systemRoleRouter.routes()).use(router.allowedMethods())
  app.use(syslogIninforRouter.routes()).use(router.allowedMethods())
};
